import {Collapse} from 'antd'
import {ReactNode} from 'react'

const Panel = Collapse.Panel;

const AntCollapse = ({defaultActiveKey, bordered, style,items}) => {

    return (
        <Collapse bordered={bordered} defaultActiveKey={[defaultActiveKey]}>
            {
                (items || []).map((item,index) =>{
                    return(
                        <Panel showArrow={false}  header={item.header} key={index} style={style}>
                            {item.text}
                        </Panel>
                    )
                })
            }
        </Collapse>
    )
};

export default AntCollapse